<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;
class GmTclpaneltzb extends Model
{
    use SoftDelete;
     protected $deleteTime = "delete_time";
    // 获取列表
    public static function getList()
    {
        $where = [];
        $limit = input('get.limit');
        
               //按轮次id查找
               if ($lcid = input("lcid")) {
                   $where[] = ["lcid", "like", "%" . $lcid . "%"];
               }
               //按参与人员账号查找
               if ($cyaccount = input("cyaccount")) {
                   $where[] = ["cyaccount", "like", "%" . $cyaccount . "%"];
               }
               //按参与人员actorid查找
               if ($cyactorid = input("cyactorid")) {
                   $where[] = ["cyactorid", "like", "%" . $cyactorid . "%"];
               }
               //按区服名称查找
               if ($cyqufu = input("cyqufu")) {
                   $where[] = ["cyqufu", "like", "%" . $cyqufu . "%"];
               }
               //按区服id查找
               if ($cyqufuid = input("cyqufuid")) {
                   $where[] = ["cyqufuid", "like", "%" . $cyqufuid . "%"];
               }
               //按是否头筹(1.否 2.是)查找
               if ($istc = input("istc")) {
                   $where[] = ["istc", "like", "%" . $istc . "%"];
               }
        $list = self::order('id','desc')->where($where)->paginate($limit);
        return ['code'=>0,'data'=>$list->items(),'extend'=>['count' => $list->total(), 'limit' => $limit]];
    }
}
